﻿<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
		<title>新房转介</title>
		<link href="__ROOT__/public/webapp/css/public.css" rel="stylesheet" type="text/css">
		<link rel="stylesheet" href="__ROOT__/public/webapp/css/menudown.css" type="text/css"/>
		<link rel="stylesheet" href="__ROOT__/public/webapp/css/xinfangzhuanjie.css" type="text/css"/>
		<link rel="stylesheet" href="__ROOT__/public/webapp/css/xinfangzhuanjieck.css" type="text/css"/>
		<link rel="stylesheet" href="__ROOT__/public/webapp/css/icon.css" type="text/css"/>
		<link rel="stylesheet" href="__ROOT__/public/webapp/css/iconfont.css" type="text/css"/>
		<link rel="stylesheet" href="__ROOT__/public/webapp/css/valide.css" type="text/css"/>
		<link href="__ROOT__/public/webapp/css/swiper.min.css" rel="stylesheet" type="text/css">
		<link rel="stylesheet" href="__ROOT__/public/webapp/css/styleyi.css" type="text/css"/>
		<!--<link rel="stylesheet" href="__ROOT__/public/webapp/css/valide.css" type="text/css"/>-->
		
		
	</head>
	<style>
    .divfocus::after{
        border-bottom: 0.2rem solid rgb(78, 140, 239);
    }
        .focus>p{
        border-bottom: 1px rgb(78, 140, 239) solid !important;
        color: rgb(78, 140, 239);
        }
        #section-t .nav-t .section-t-r dt{
            line-height: inherit;
        }
        .alertMsg span{
        	font-size:18px!important;
        }
        .header_fixed{
        	position:fixed;
        	top:0px;
        	left:0px;
        	z-index:10;
        }
        .new_img i {
    position: absolute;
    top: -15px;
    right: -11px;
    font-size: 20px;
    z-index: 100;
            color: #4e8cef;
}
        .upimg_box i {
    font-size: 23px;
    line-height: 70px;
    color: #999!important;
}
        .icon-jiahao1 {
    margin-left: 6px;
}
        #section-t .nav-t .section-t-r dt{
            font-size: 0.2rem;line-height:2;}
    </style>
	<body>
		<form action="" method="post" class="demoform">
		<!--轮播图开始-->
		<section id="section">
			
		
		<div class="swiper-container">
    		<div class="swiper-wrapper">
				<php>$ur = $_SERVER[HTTP_HOST];</php>
				<volist name="lun" id="q">
        		<div class="swiper-slide" >
					<a href="{$q.slide_url}"><img src="http://<?php echo $ur ?>/data/upload/{$q.slide_pic}" /></a>
       			 </div>
				</volist>
        	</div>
        		
        		
    		
		    <!-- 如果需要分页器-->
		    <div class="swiper-pagination" style="bottom:10px; opacity: 1"></div> 

		</div>
		</section>
		<!--轮播图结束-->
		<div id="header" class="">
			<ul>
			<li>
			<nav data-id="fabu" class="yi"><a href="#fabu">发布</a></nav>
			<nav data-id="chakan" class="er"><a href="#chakan">查看</a></nav>
			</li>
			<li class="list">
				<dl  class="two san">住宅<i class="z"><svg class="icon" aria-hidden="true" style="color:#4e8cef;font-size: 15px;position: absolute;right: 0;bottom:0;">
  <use xlink:href="#icon-left-top"></use></svg></i></dl>
				<dl class="two si">写字楼<i class="b"><svg class="icon" aria-hidden="true" style="color:#4e8cef;font-size: 15px;position: absolute;right: 0;bottom:0;">
  <use xlink:href="#icon-left-top"></use></svg></i></dl>
				<dl class="two wu">商铺<i class="s"><svg class="icon" aria-hidden="true" style="color:#4e8cef;font-size: 15px;position: absolute;right: 0;bottom:0;">
  <use xlink:href="#icon-left-top"></use></svg></i></dl>
				<dl class="two liu">车位<i class="c"><svg class="icon" aria-hidden="true" style="color:#4e8cef;font-size: 15px;position: absolute;right: 0;bottom:0;">
  <use xlink:href="#icon-left-top"></use></svg></i></dl>
			</li>
		</ul>	
			<dl class="topmenu clear" style="display: none;">
			<dt style="width: 20%;border-bottom: 1px solid #b3b3b3;">
				<div class="selectlist">
					<div class="select_textdiv">
					
						<input type="hidden" value=""/>
						<p class="s_text">类型</p>
						
						<span class="down" style="margin-left: 11%;" ><svg class="icon down" aria-hidden="true" style="color:#bababa;font-size: .3rem; ">
  <use xlink:href="#icon-jiantou2"></use></svg></span>
					</div>
					<div class="select_textul">
						<ul class="select_first_ul">
							<li>
								<p>住宅</p>
								
							</li>
							<li>
								<p>写字楼</p>
								
							</li>
							<li>
								<p>商铺</p>
								
							</li>
							<li>
								<p>车位</p>
								
							</li>
						</ul>
					</div>
				</div>	
			</dt>
			<dt style="width: 30%;border-bottom: 1px solid #b3b3b3;">
				<div class="selectlist">
					<div class="select_textdiv">
						<input type="hidden" value=""/>
						<p class="s_text">区域</p>
						<span class="down" style="margin-left: 11%;"><svg class="icon down" aria-hidden="true" style="color:#bababa;font-size: .3rem; ">
  <use xlink:href="#icon-jiantou2"></use></svg></span>
					</div>
					<div class="select_textul">
						<ul class="select_first_ul">
							<li class="focus">
								<p>西安</p>
								<ul class="select_second_ul" style="display: block;">
									<li>不限</li>
									<li>新城区</li>
									<li>碑林区</li>
									<li>莲湖区</li>
									<li>灞桥区</li>
									<li>未央区</li>
									<li>雁塔区</li>
									<li>阎良区</li>
									<li>临潼区</li>
									<li>长安区</li>
									<li>高新</li>
									<li>曲江</li>
									<li>周边区域</li>
									
								</ul>
							</li>
							<li>
								<p>成都</p>
								<ul class="select_second_ul">
									<li>不限</li>
									<li>锦江区</li>
									<li>青羊区</li>
									<li>金牛区</li>
									<li>武侯区</li>
									<li>成华区</li>
									<li>龙泉驿区</li>
									<li>青白江区</li>
									<li>新都区</li>
									<li>温江区</li>
									
									<li>周边区域</li>
								</ul>
							</li>
							
							<li>
								<p>郑州</p>
								<ul class="select_second_ul">
									<li>不限</li>
									<li>中原区</li>
									<li>二七区</li>
									<li>管城回族区</li>
									<li>金水区</li>
									<li>上街区</li>
									<li>惠济区</li>
									<li>中牟县</li>
									<li>巩义市</li>
									<li>荥阳市</li>
									<li>新密市</li>
									<li>新郑市</li>
									<li>登封市</li>
									<li>郑东新区</li>
									<li>高新区</li>
									<li>周边区域</li>
								</ul>
							</li>
							
							<li>
								<p>武汉</p>
								<ul class="select_second_ul">
									<li>不限</li>
									<li>江岸区</li>
									<li>江汉区</li>
									<li>硚口区</li>
									<li>汉阳区</li>
									<li>武昌区</li>
									<li>青山区</li>
									<li>洪山区</li>
									<li>东西湖区</li>
									<li>汉南区</li>
									<li>武昌区</li>
									<li>青山区</li>
									<li>洪山区</li>
									<li>东西湖区</li>
									<li>汉南区</li>
									
									<li>蔡甸区</li>
									<li>江夏区</li>
									<li>黄陂区</li>
									<li>新洲区</li>
									
									<li>周边区域</li>
								</ul>
							</li>
						</ul>
					</div>
				</div>	
			</dt>
			<dt style="width: 30%;border-bottom: 1px solid #b3b3b3;">
				<div class="selectlist">
					<div class="select_textdiv">
						<input type="hidden" value=""/>
						<p class="s_text">价格</p>
						<span class="down" style="margin-left: 9%;"><svg class="icon down" aria-hidden="true" style="color:#bababa;font-size: .3rem; ">
  <use xlink:href="#icon-jiantou2"></use></svg></span>
					</div>
					<div class="select_textul">
						<ul class="select_first_ul">
							<li>
								<p>不限</p>
								
							</li>
							<li>
								<p>30万以下</p>
								
							</li>
							<li>
								<p>30-50万</p>
								
							</li>
							<li>
								<p>50-70万</p>
								
							</li>
							<li>
								<p>70-90万</p>
								
							</li>
							<li>
								<p>90-100万</p>
								
							</li>
							<li>
								<p>100万以上</p>
								
							</li>
						</ul>
					</div>
				</div>	
			</dt>
			<dt style="width:20%; border-bottom: 1px solid #b3b3b3;">
				<div class="selectlist" >
					<a  href="/index.php?g=Wechat&m=Webmine&a=sousuo#xinfang" class="select_textdiv" style="text-align:left; display: block;">
						<input type="hidden" value=""/>
						<p class="s_text"></p>
						<span class="down" style="margin-left: "><svg class="icon down" aria-hidden="true" style="font-size: .3rem; margin:0 50%;">
  <use xlink:href="#icon-sousuo"></use></svg></span>
					</a>
				</div>	
			</dt>
		</dl>
		
		
		<!--第一个bar的隐藏提交-->
						<input type="text" name="type" hidden value="" class="type">
						<!--第二个bar的隐藏提交-->
						<input type="text" name="buildtype" hidden  value="" class="lei">
						
				
		</div>
		
		
	
	
		<div id="main">
			<!--住宅-->
			<article>
			
					<ul >
						<li>
							<p><svg class="icon" aria-hidden="true" style="color:#4e8cef;font-size: 20px;">
							<use xlink:href="#icon-diqu"></use></svg><span>区域</span></p>
							<dl>
	<!--					<select style="border: 0;" name="quyu" id="quyu">

							<option value="新城区">新城区&nbsp;&nbsp;&nbsp;&nbsp;</option>
							<option value="莲湖区">莲湖区&nbsp;&nbsp;&nbsp;&nbsp;</option>
							<option value="雁塔区">雁塔区&nbsp;&nbsp;&nbsp;&nbsp;</option>
							<option value="碑林区">碑林区&nbsp;&nbsp;&nbsp;&nbsp;</option>
							<option value="未央区">未央区&nbsp;&nbsp;&nbsp;&nbsp;</option>
							<option value="灞桥区">灞桥区&nbsp;&nbsp;&nbsp;&nbsp;</option>
							<option value="长安区">长安区&nbsp;&nbsp;&nbsp;&nbsp;</option>
							<option value="临潼区">临潼区&nbsp;&nbsp;&nbsp;&nbsp;</option>
							<option value="西咸新区">西咸新区&nbsp;&nbsp;&nbsp;&nbsp;</option>
							<option value="高新区">高新区&nbsp;&nbsp;&nbsp;&nbsp;</option>
							<option value="曲江新区">曲江新区&nbsp;&nbsp;&nbsp;&nbsp;</option>
							<option value="西安周边">西安周边&nbsp;&nbsp;&nbsp;&nbsp;</option>
						</select>-->
								<select name="chengshi" style="border: 0;" datatype="*" nullmsg="请选择所在城市！" onchange="$(this).next('select').selectCity(this);">
									<option value="">城市</option>
									<option value="西安">西安</option>
									<option value="成都">成都</option>
									<option value="武汉">武汉</option>
									<option value="郑州">郑州</option>
								</select>
								
								<select name="quyu" style="border: 0;" datatype="*" nullmsg="请选择所在区域！">
								<option value="">选择城市</option>
								</select>
					</dl>


				</li>
				<li>

					<p><svg class="icon" aria-hidden="true" style="color:#4e8cef;font-size: 20px;">
						<use xlink:href="#icon-xiaoqu"></use></svg><span class="siyue">小区</span></p><input type="text"  placeholder="请输入名称"  name="buildname" id="xiaoqu" datatype="*" nullmsg="小区不能为空！" errormsg="昵称至少1个字符,最多18个字符！"/>
				</li>
				<li>
					<p><svg class="icon" aria-hidden="true" style="color:#4e8cef;font-size: 20px;">
						<use xlink:href="#icon-dizhi"></use></svg><span>地址</span></p><input type="text" placeholder="请输入地址"  name="dizhi" id="dizhi" datatype="*" nullmsg="地址不能为空！" errormsg="昵称至少1个字符,最多18个字符！" />
				</li>
				<li>
					<p><svg class="icon" aria-hidden="true" style="color:#4e8cef;font-size: 20px;">
						<use xlink:href="#icon-jiage"></use></svg><span >价格</span></p>
						<input type="number" placeholder="请输入金额" name="" id="qian" datatype="*" nullmsg="价格不能为空！" style="width: 50%;
margin-right: ;" onchange="inputprfmt(this)"/>
						<input type="hidden" name="where" id="where" />
						<dl>
						<!--万元-->
							<select style="border: 0;" name="" id="qian_danwei" onchange="Jiage();">
								<option value="元/m²">元/m²</option>
								<option value="万元">万元</option>
							</select>

						</dl>
						<input type="hidden" name="jiage" id="jiage" value="" />
				</li>
				<li >
					<p><svg class="icon" aria-hidden="true" style="color:#4e8cef;font-size: 20px;">
						<use xlink:href="#icon-yongjinguanli"></use></svg>
						<span>佣金</span>
					</p>
					<input type="text"  placeholder="例：2% 或 1万元每套" name="yongjin" id="jin" datatype="*" nullmsg="佣金不能为空！" errormsg="昵称至少1个字符,最多18个字符！" />
				</li>
				<li >
					<p><svg class="icon" aria-hidden="true" style="color:#4e8cef;font-size: 20px;">
						<use xlink:href="#icon-naoling"></use></svg><span>返佣时间</span></p>	
						<dl>
						<select style="border: 0;" name="fanyong" id="" datatype="*" nullmsg="返佣时间不能为空！">
							<option value="">请选择&nbsp;&nbsp;</option>
							<option value="签约后三天">签约后三天&nbsp;&nbsp;</option>
							<option value="签约后一周">签约后一周&nbsp;&nbsp;</option>
							<option value="签约后一月">签约后一月&nbsp;&nbsp;</option>
							<option value="商议">商议&nbsp;&nbsp;</option>

						</select>

						</dl>
				</li>
				<!--上传图片开始-->
					<div id="shangchuantp" style="border-bottom:1px solid #EBEBEB;">
						<div class="shangchuan-t" style="padding-top: 1%；">

						<p style="color: #4e8cef;"><svg class="icon" aria-hidden="true" style="color:#4e8cef;font-size: 23px;">
							<use xlink:href="#icon-zhaopian"></use></svg><span style="margin-left: 6px;font-size: .3rem;">上传图片</span><b style="font-weight:400;margin-top: 1%;font-size: .3rem;">（第一张为封面,不大于3MB）</b></p>
						</div>
							<!--    照片添加    -->
										
						<div class="clearfix">
							<div class="imgmain_container clearfix house_wrap">
											
								<div class="upimg_box left" style="position:relative;">
									<i class="iconfont icon-jiahao1"></i>
										<input type="file" name="" id="house_img" value="" multiple="multiple" datatype="*" nullmsg="请上传图片!"/>
										<input type="hidden" name="thumb" class="i_id"/>
								</div>
							</div>

						</div>
									
					</div>
								<!--上传图片结束-->
				  
				

			
		
			
			<div class="xq">
				<p><svg class="icon" aria-hidden="true" style="color:#4e8cef;font-size: 20px;">
  <use xlink:href="#icon-xiangqing"></use></svg><span>详情描述</span></p><textarea class="zi"  name="des" maxlength="200" placeholder="限200字" datatype="*1-200" nullmsg="描述不能为空！" errormsg="昵称至少1个字符,最多18个字符！" ></textarea>
			</div>
				
		</ul>
			<div id="bj">
		</div>
		
		<ul>
			
			<li>
			
				<p><svg class="icon" aria-hidden="true" style="color:#4e8cef;font-size: 20px;">
  <use xlink:href="#icon-xingming"></use></svg><span>发布人姓名</span></p><input type="text" placeholder="请输入姓名" name="name" id="xingming" datatype="*" nullmsg="姓名不能为空！" errormsg="昵称至少1个字符,最多18个字符！"  />
			</li>
			<!--上传图片开始二维码-->
					<div id="shangchuantp" style="border-bottom:1px solid #EBEBEB;">
						<div class="shangchuan-t" style="padding-top:1%;">

						<p style="color: #4e8cef;"><svg class="icon" aria-hidden="true" style="color:#4e8cef;font-size: 23px;">
							<use xlink:href="#icon-zhaopian"></use></svg><span style="margin-left: 6px;font-size:.3rem;">上传微信二维码</span></p>
						</div>
							<!--    照片添加    -->
										
						<div class="clearfix">
								<div class="imgmain_container left clearfix code_wrap">
											
								<div class="upimg_box left" style="position:relative;">
									<svg class="icon jiahao" aria-hidden="true" style="color:#4e8cef;font-size: 20px; position:absolute;left: 0;right: 0;top: 0;bottom: 0;margin: auto;">
										<use xlink:href="#icon-jiahao"></use></svg>
										<input type="file" name="" id="code_img" value="" multiple="multiple" />
										<input type="hidden" name="erwei" class="i_id"/>
								</div>
							</div>

						</div>
									
					</div>
								<!--上传图片结束-->
			<li>
					<p ><svg class="icon" aria-hidden="true" style="color:#4e8cef;font-size: 20px;">
	  <use xlink:href="#icon-kehudianhua"></use></svg><span>业务联系电话</span></p><input type="number"  min="0" name="tel" placeholder="请输入电话号"  class="tel" datatype="*1-11" nullmsg="电话号码不能为空！" errormsg="电话号码格式错误！"/>
				</li>	  
			
			<li>
					<p><svg class="icon" aria-hidden="true" style="color:#4e8cef;font-size: 20px;">
	  <use xlink:href="#icon-kehudianhua"></use></svg><span>发布人手机</span></p><input type="number"  min="0" name="phone" placeholder="请输入手机号"  class="userName" datatype="phone" nullmsg="手机号不能为空！" errormsg="手机号格式错误！"/>
				</li>
				

				<li>
					<p><svg class="icon" aria-hidden="true" style="color:#4e8cef;font-size: 20px;">
	  <use xlink:href="#icon-unie637"></use></svg><span>验证码</span></p><input type="number" style="width: 40%;" min="0" class="code" name="code"  placeholder="请输入验证码"  datatype="*" nullmsg="验证码不能为空！" errormsg="验证码错误！"/><a  style="color:#4e8cef;" class="timePlay">发送验证码</a>
				</li>
		</ul>	
		
		
	
		<!--头部结尾-->
		<input type="submit"  class="footer"  value="立即发布"/>
		

					
		</article>
			
		
		
		<article style="display: none;" id="zulist">
			
		
			
		 <!--列表-->
           
           	
           	<!--出租-->
	            <section id="section-t">
	          				<a href="#" class="nav-t">
	          					
	          						<div class="section-t-l">
	          							<img src="__ROOT__/public/webapp/img/xinfangyi.png" />
	          						</div>
	          						<div class="section-t-r">
	          							<div class="section-t-r-o">
		          							<div class="section-t-r-t">
												<p><span>08-01 10:00</span></p>
												<p><svg class="icon" aria-hidden="true" style="color:#4e8cef;font-size: 20px;">
				  <use xlink:href="#icon-liulan"></use></svg> <span>16 次</span></p>
											</div>
											<dl><span>雁塔区</span> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; <span>xx楼盘</span>
												
											</dl>
											<dl> <span>8000元/m²</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span>3%</span></dl>
										</div>
										<div class="border"></div>
										<dt>转介信息10天后自动失效</dt>
									</div>
	          				
	          				</a>
	            	</section>
	           
			
			
			
			
		</article>
		</div>
		
		</form>
	<div class="alertMsg">
    	<span></span>
    </div>
    <script type="text/html">
     {{ if(!!data){ }}
     {{ for(var i=0;i<data.length;i++){ }}
      <div class="house_cell">
       {{ var list=data[i]; }}
        <div class="cell_main clearfix">
            <a class="left avatar_wrap" href=" ">
                < img src="/index.php?g=Wechat&m=webcont&a=zulin&id={{=list.id}}" class="avatar">
                <p>{{=list.name||""}}</p >
            </ a>
            <a class="right right_info" href="index.html">
                <div class="right_top">
                    <span>{{=new Date(list.time*1000).Format("MM-dd hh:mm:ss")}}</span>
<!--                    <span class="time">10:00</span>-->
                    <span class="right">
                <i class="iconfont icon-liulan"></i>
                <span>{{=list.read||""}}次</span>
                    </span>
                </div>
                <div class="right_mid">
                    <p>
                        区域:
                        <span>{{=list.chengshi||""}}{{=list.quyu||""}}</span>
                    </p >
                    <p class="spacing">
                        户型:
                        <span>{{=list.huxing||""}}</span>
                    </p >
                </div>
                <div class="right_bot">
                    <p>
                        面积:
                        <span>{{=list.mianji||""}}</span>
                    </p >
                    <p class="spacing">
                        月租:
                        <span>{{=list.jiage||""}}</span>
                    </p >
                </div>
            </ a>
        </div>
        <div class="cell_bot" {{ if(getCountDown(list.time)=="已失效"){ }} style="color:#666; {{ } }}">
            {{=getCountDown(list.time)}}
        </div>
    </div>
     {{ } }}
     {{ } }}
    </script>
    <script id="chuzulist" type="text/html">
    	{{ for(var i=0;i<data.length;i++){ }}
    	{{ var list=data[i]; }}
    	<section id="section-t">
      	<a href="/index.php?g=Wechat&m=webcont&a=xinfang&id={{=list.id}}" class="nav-t">
			<div class="section-t-l">
				<img src="{{=imgzy(list.thumb) }}" class="avatar">
			</div>
			<div class="section-t-r">
				<div class="section-t-r-o">
					<div class="section-t-r-t">
						<p><span>{{=new Date(list.time*1000).Format("MM-dd hh:mm:ss")}}</span></p>
						<p><svg class="icon" aria-hidden="true" style="color:#4e8cef;font-size: 20px;">
  <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#icon-liulan"></use></svg> <span>{{=list.read}}次</span></p>
					</div>
					<dl><span>{{=list.chengshi||""}}{{=list.quyu||""}}</span> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; <span>{{=list.buildname||""}}</span>
						
					</dl>
					<dl> <span>佣金{{=list.yongjin||""}}</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span>{{=list.fanyong||""}}</span></dl>
				</div>
<!--				<div class="border"></div>

				<dt class="cell_bot" {{ if(getCountDown(list.time)=="已失效"){ }} style="color:#666; {{ } }}">
					{{=getCountDown(list.time)}}
				</dt>
-->
			</div>
			</a>
        	</section>
        {{ } }}
    </script>
	</body>
</html>
<script type="text/javascript" src="__ROOT__/public/webapp/js/com.js" ></script>

<script type="text/javascript" src="__ROOT__/public/webapp/js/jquery-1.8.3.min.js" ></script>
<script type="text/javascript" src="__ROOT__/public/webapp/js/swiper-3.4.2.min.js" ></script>
<script type="text/javascript" src="__ROOT__/public/webapp/js/iconfontg.js" ></script>
<script type="text/javascript" src="__ROOT__/public/webapp/js/iconfont.js" ></script>
<script type="text/javascript" src="__ROOT__/public/webapp/js/shangchuan.js" ></script>
<script type="text/javascript" src="__ROOT__/public/webapp/js/template.js" ></script>

<script type="text/javascript" src="__ROOT__/public/webapp/js/jquery.min.js" ></script>
<script type="text/javascript" src="__ROOT__/public/webapp/js/xinfangzhuanjie.js" ></script>
<script type="text/javascript" src="__ROOT__/public/webapp/js/xinfangzhuanjiexs.js" ></script>
<script type="text/javascript" src="__ROOT__/public/webapp/js/Validform_v5.3.2_min.js" ></script>
<script type="text/javascript" src="__ROOT__/public/webapp/js/menudown.js" ></script>
<script type="text/javascript" src="__ROOT__/public/webapp/js/common.js" ></script>
<script>
	
	window.onscroll = function() {
		var scrollTop = document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop;
		if(scrollTop > 180) {
			$('#header').addClass('header_fixed');
			$('#main').css('margin-top', '2.2rem');
		} else {
			$('#header').removeClass('header_fixed');
			$('#main').css('margin-top', '0rem');
	 
		}
	}
	
	        //时间格式化
        Date.prototype.Format = function(fmt) { //author: meizz 
          var o = { 
            "M+" : this.getMonth()+1,                 //月份 
            "d+" : this.getDate(),                    //日 
            "h+" : this.getHours(),                   //小时 
            "m+" : this.getMinutes(),                 //分 
            "s+" : this.getSeconds(),                 //秒 
            "q+" : Math.floor((this.getMonth()+3)/3), //季度 
            "S"  : this.getMilliseconds()             //毫秒 
          }; 
          if(/(y+)/.test(fmt)) 
            fmt=fmt.replace(RegExp.$1, (this.getFullYear()+"").substr(4 - RegExp.$1.length)); 
          for(var k in o) 
            if(new RegExp("("+ k +")").test(fmt)) 
          fmt = fmt.replace(RegExp.$1, (RegExp.$1.length==1) ? (o[k]) : (("00"+ o[k]).substr((""+ o[k]).length))); 
          return fmt; 
            }
//     var getCountDown=function(timestamp) {
//              var nowTime = new Date();
//              var endTime = new Date(timestamp * 1000);
//
//              var t = endTime.getTime() - (nowTime.getTime()-(3600*24*16*1000));
//              var d=Math.floor(t/(1000/60/60/24))+1;
//              var hour = Math.floor(t / 1000 / 60 / 60 % 24);
//              var min = Math.floor(t / 1000 / 60 % 60);
//              var sec = Math.floor(t / 1000 % 60);
//
//              if (hour < 10) {
//                  hour = "0" + hour;
//              }
//              if (min < 10) {
//                  min = "0" + min;
//              }
//              if (sec < 10) {
//                  sec = "0" + sec;
//              }
//              var countDownTime =d>0?"转介信息"+d+"天后自动失效":"已失效";
//             return countDownTime;
//     }
	function selectCallback(self,url){
        console.log(self)
        
		var json={};
		json["type"]=$("#header > dl > dt:nth-child(1) > div > div.select_textul > ul > li.focus").index()-0+1;
		json["chengshi"]=$("#header > dl > dt:nth-child(2) > div > div.select_textul > ul > li.focus > p").text()=="不限"?null:$("#header > dl > dt:nth-child(2) > div > div.select_textul > ul > li.focus > p").text();
        json["quyu"]=$("#header > dl > dt:nth-child(2) > div > div.select_textul > ul > li.focus > ul > li.focusli").text()=="不限"?null:$("#header > dl > dt:nth-child(2) > div > div.select_textul > ul > li.focus > ul > li.focusli").text();
		json["where"]=($("#header > dl > dt:nth-child(3) > div > div.select_textdiv > p").text()=="价格"||$("#header > dl > dt:nth-child(3) > div > div.select_textdiv > p").text()=="不限")?null:$("#header > dl > dt:nth-child(3) > div > div.select_textdiv > p").text();
		console.log(json)
		$.ajax({
        type: "post",
        url: url?url:"/index.php?g=Wechat&m=Webzhuan&a=xinfangfan",
        "contentType": "application/x-www-form-urlencoded; charset=utf-8",
        data:json,
        dataType: "json",
        success: function (data ,textStatus, jqXHR)
        {
            if(data.length>0){
            var html=$("#chuzulist").html(),datas={
                data:data
            };
            var thtml=template(html,datas);
            
              $("#zulist").html(thtml);
                }else{
               $("#zulist").html("<div class='nodata'>暂无匹配数据</div>");     
                }  
                
            
        },
        error:function (XMLHttpRequest, textStatus, errorThrown) {      
        }
     });
	}
    selectCallback(0,"/index.php?g=Wechat&m=Webzhuan&a=xinfangshuju");
$(function(){
	
	
	// 轮播图
		var swiper = new Swiper('.swiper-container', {
			pagination: '.swiper-pagination',
			paginationClickable: true,
			autoplay: 2000,
			loop: true
		});
	//图片上传
	$("input[type=file]").imgupload();


 //		message验证
        var toggleAlert=function(msg){
            $(".alertMsg").addClass("on").find("span").html(msg);
            setTimeout(function(){
                $(".alertMsg").removeClass("on");
            },2000);
        };
		$.Tipmsg.r=null;
        var showmsg=function(msg){
            toggleAlert(msg);
        };
		$(".demoform").Validform({
			datatype:{
				"phone":function(gets,obj,curform,regxp){
					/*参数gets是获取到的表单元素值，
					  obj为当前表单元素，
					  curform为当前验证的表单，
					  regxp为内置的一些正则表达式的引用。*/
	
					var reg1=/^1(3|4|5|7|8)[0-9]\d{8}$/,
                        reg2=/^1(3|4|5|7|8)[0-9]\d{8}$/,
                        mobile=curform.find(".mobile");
					
					if(reg1.test(mobile.val())){return true;}
					if(reg2.test(gets)){return true;}
					
					return false;
				}
			},
			ajaxPost:false,
            tiptype:function(msg){
					showmsg(msg);
				},
				tipSweep:true,
				
		});
 //验证码
        fsTime.init({
            class:".timePlay",
            input:".userName",
            code:".code",
            num:60
        });
        
        
        
        
        });
        

        var prfmt=function(num){
        	if(typeof (num-0)=="number"){
        	if(num<30){
        		return "30万以下";
        	}
        	if(num>30&&num<50){
        		return "30-50万";
        	}
        	if(num>50&&num<70){
        		return "50-70万";
        	}
        	if(num>70&&num<90){
        		return "70-90万";
        	}
        	if(num>90&&num<100){
        		return "90-100万";
        	}
        	if(num>100){
        		return "100万以上";
        	}
        	}
        }
        var inputprfmt=function(self){
        	self.setAttribute("data-val",prfmt(self.value));
        	document.querySelector("#where").value=prfmt(self.value);
        	Jiage();
        	
        }
        function Jiage(){
        	var jiage_str = $("#qian").val()+$("#qian_danwei").val();
        	$("#jiage").val(jiage_str);
        	return jiage_str;
        }
</script>